import demo1.*;

import java.util.Queue;
import java.util.Stack;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: LianBao
 * Date: 2024-04-01
 * Time: 12:58
 */
public class Test {

    public static void main(String[] args) {
        Stack<Integer> stack = new Stack<>();
        stack.push(1);
        stack.push(2);
        stack.push(3);
        System.out.println(stack.search(1));
        //3
        //2
        //1
    }

    public static void main2(String[] args) {
        myStack<String> myStack = new myStack<>();
        String ret = myStack.push("hello");
        myStack.push("world");
        System.out.println(myStack.peek());
        myStack.pop();
        System.out.println(myStack.peek());
    }

    public static void main1(String[] args) {
        myQueue<Integer> queue = new myQueue<>();
        queue.offer(1);
        System.out.println(queue.peek());
        queue.offer(2);
        queue.poll();
        System.out.println(queue.peek());
    }
}
